Recently, with miniaturization and higher functionality of a semiconductor device, a cross section structure of the semiconductor device is required to be observed and inspected in addition to inspection of the surface pattern of the semiconductor device. In the inspection of the structure of the semiconductor device, a minute sample piece is cut out from the semiconductor device to be observed by an electron microscope. In order to cut out the minute sample piece from the semiconductor device, a charged particle beam system including a mechanical probe and a deposition gun or a focused ion beam system is used.
In the above processing apparatus, when the minute sample piece is cut out, the mechanical probe should be in contact with the surface of the sample. Accordingly, the processing apparatus is provided with a device for detecting the contact of the mechanical probe. The contact of the mechanical probe is detected by the contact detecting device, whereby the mechanical probe is prevented from being damaged.
Patent Document 1 discloses a technique of detecting the contact of the mechanical probe by measuring a current flowing from a sample to be processed toward the mechanical probe.
However, in some semiconductor devices, the surface of the sample to be processed is protected by an insulating film. In this case, a current does not flow between the mechanical probe and the sample to be processed. Thus, the electrical method described in the Patent Document 1 cannot be used in this case.
Patent Document 2 describes a method of moving the mechanical probe while measuring the distance between the sample to be processed and the mechanical probe by images from different directions. However, in this method, there is a problem that the device is complicated. Further, in this method, the mechanical probe is required to be moved in the same direction until the front end of the mechanical probe and the front end of the shadow coincide with each other. Thus, there is a defect that it is not available until the distance between the mechanical probe and the sample to be processed becomes several μm. In addition, it is necessary to precisely obtain the incidence angle of a focused ion beam and the mounting angle of the mechanical probe.
Patent Document 3 describes a technique of detecting the contact using that a probe image is changed by application of an AC voltage to the mechanical probe or that the image is changed between before and after contact due to mechanical vibration of the mechanical probe. In this method, since an AC voltage source is required to be provided, there is a problem that the device is complicated and increased in size.
Patent Document 4 describes a method of accurately obtaining the distance between the sample to be processed and the mechanical probe by images obtained from two or more microscopes. In this method, since the two or more microscopes are required to be provided, there is a problem that the device is increased in size.
Patent Document 5 describes a method of bringing the mechanical probe into contact safely by reducing the drive speed of the mechanical probe, and using a shadow near the mechanical probe. This method simply utilizes the reduction in brightness around the mechanical probe, and there is a problem that the reliability of the detection of the contact is low.
Patent Document 6 describes a method of driving the mechanical probe until the front end of the mechanical probe and the shadow generated from the mechanical probe coincide with each other. However, the brightness of an image is reduced depending on a state of a sample to be processed, such as when an observation object is an insulating material. In such a case, contrast is required to be increased by applying a voltage to the mechanical probe. Accordingly, there is a problem that the device configuration is complicated.
As described above, in the method of detecting the contact of the mechanical probe with the use of the image of the mechanical probe, in general, there is a common problem that the reliability is significantly reduced depending on the case where the brightness of an obtained image is low and the pattern formed on the sample surface.
Patent Document 5 describes a method capable of dealing with the case where the brightness is low by obtaining a change from an image obtained in the last step. However, when the change between an image with low brightness and the image in the last step is calculated, noise is emphasized, whereby there is a problem that the detection reliability is reduced.    Patent Document 1: Japanese Patent Laid-Open Publication No. 2001-235321    Patent Document 2: Japanese Patent Laid-Open Publication No. 2006-93102    Patent Document 3: Japanese Patent Laid-Open Publication No. 2007-189113    Patent Document 4: Japanese Patent Laid-Open Publication No. 2005-167146    Patent Document 5: Japanese Patent Laid-Open Publication No. 2002-40107    Patent Document 6: Japanese Patent Laid-Open Publication No. 2006-93102